import { requestClient } from '#/api/request';

export function AddObj(obj: any) {
  return requestClient.request('/iam/dict', {
    method: 'post',
    data: obj,
  });
}

export function DelObj(id: string) {
  return requestClient.request(`/iam/dict/${id}`, {
    method: 'delete',
    data: { id },
  });
}

export function BatchDelete(ids: any) {
  return requestClient.request(`/iam/dict`, {
    method: 'delete',
    data: ids,
  });
}

export function UpdateObj(obj: any) {
  return requestClient.request(`/iam/dict/${obj.id}`, {
    method: 'put',
    data: obj,
  });
}

export function Refresh() {
  return requestClient.post('/iam/dict/refresh');
}

export function GetList() {
  return requestClient.get('/iam/dict/list');
}
